from jinja2 import Environment

def environment(**options):
    env = Environment(**options)
    env.filters['filter_red'] = filter_red
    return env

def filter_red(li):
    if li == '赤':
        return '呗吃了'
    return li